package com.ruoyi.article.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.xml.stream.events.Comment;

/**
 * 文章信息对象 article
 * 
 * @author ruoyi
 * @date 2025-06-11
 */
public class Article extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 文章ID */
    private Long articleid;

    /** 文章编号 */
    @Excel(name = "文章编号")
    private String articlesn;

    /** 文章标题 */
    @Excel(name = "文章标题")
    private String articletitle;

    /** 文章内容 */
    @Excel(name = "文章内容")
    private String articlecontent;

    /** 作者 */
    @Excel(name = "作者")
    private String author;

    /** 图片 */
    @Excel(name = "图片")
    private String image;

    /** 类ID */
    @Excel(name = "类ID")
    private Long claid;

    /** 发行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发行时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date pulishtime;

    /** 是否推荐 */
    @Excel(name = "是否推荐")
    private Integer isrecommend;

    /** 是否显示 */
    @Excel(name = "是否显示")
    private Integer isshow;

    private List<Comment> commentList;
    public List<Comment> getCommentList(){return commentList;};
    private void setCommentList(List<Comment> commentList){
        this.commentList=commentList;
    }

    public void setArticleid(Long articleid) 
    {
        this.articleid = articleid;
    }

    public Long getArticleid() 
    {
        return articleid;
    }
    public void setArticlesn(String articlesn) 
    {
        this.articlesn = articlesn;
    }

    public String getArticlesn() 
    {
        return articlesn;
    }
    public void setArticletitle(String articletitle) 
    {
        this.articletitle = articletitle;
    }

    public String getArticletitle() 
    {
        return articletitle;
    }
    public void setArticlecontent(String articlecontent) 
    {
        this.articlecontent = articlecontent;
    }

    public String getArticlecontent() 
    {
        return articlecontent;
    }
    public void setAuthor(String author) 
    {
        this.author = author;
    }

    public String getAuthor() 
    {
        return author;
    }
    public void setImage(String image) 
    {
        this.image = image;
    }

    public String getImage() 
    {
        return image;
    }
    public void setClaid(Long claid) 
    {
        this.claid = claid;
    }

    public Long getClaid() 
    {
        return claid;
    }
    public void setPulishtime(Date pulishtime) 
    {
        this.pulishtime = pulishtime;
    }

    public Date getPulishtime() 
    {
        return pulishtime;
    }
    public void setIsrecommend(Integer isrecommend) 
    {
        this.isrecommend = isrecommend;
    }

    public Integer getIsrecommend() 
    {
        return isrecommend;
    }
    public void setIsshow(Integer isshow) 
    {
        this.isshow = isshow;
    }

    public Integer getIsshow() 
    {
        return isshow;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("articleid", getArticleid())
            .append("articlesn", getArticlesn())
            .append("articletitle", getArticletitle())
            .append("articlecontent", getArticlecontent())
            .append("author", getAuthor())
            .append("image", getImage())
            .append("claid", getClaid())
            .append("pulishtime", getPulishtime())
            .append("isrecommend", getIsrecommend())
            .append("isshow", getIsshow())
            .toString();
    }
}
